Ext.ClassManager.create('vacs.controller.pacienteView.pacienteViewController', {
	extend: 'Ext.app.Controller',
	views: ['pacienteView.CreateView'],
	//stores:['EstatusStore'],
	//models:['Estatus'],
	widgets: [],
	
	init: function() {
		this.control({
			'button[id = idButtonAceptar]':{click:this.aceptarButton}
			});
		//Ext.EventManager.onWindowResize(this.onWindowResizeListener, this);
		//Ext.getStore('EstatusStore').load(/*{start:0,limit:10000}*/);
	},
	
	aceptarButton:function(){
		alert('onCreate');
		/*var form = Ext.getCmp('Estatus');
		
		form.getForm().submit({
			url:'estatuses/addEstatus',
			waitTitle:'Creando nuevo Estatus',
			waitMsg: 'Guardando...',
			success: function (form, action) {
				console.log('creado exitosamente');
				window.parent.location = 'estatuses/'+action.result.data.idestatus;
			},
			
			failure: function (form, action) {
				if (!action || action.result==0) {
						Ext.MessageBox.alert('Error', 'Problemas en la conexion');
						return;
				}
				Ext.MessageBox.alert('Error', 'Ocurrio un error al crear el nuevo Estatus');
			}
			});
		*/
	}
	
});